<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>
        User Function Test
    </title>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <meta http-equiv="content-style-type" content="text/css"/>
    <meta http-equiv="content-scripte-type" content="text/javascript"/>
    <meta name="author" content="netease"/>
    <meta name="version" content="1.0"/>
    <meta name="keywords" content="pomelo"/>
    <link type="text/css" rel="stylesheet" href="/css/base.css"/>
    <script src="js/lib/build/build.js" type="text/javascript"></script>
    <script type="text/javascript">
        require('boot');
    </script>
    <script type="text/javascript">
        var pomelo = window.pomelo;
        var host = window.location.hostname;
        var port = 3014;

        function show() {
            pomelo.init({
                host: host,
                port: port,
                log: true
            }, function () {
                pomelo.request("gate.gateHandler.queryEntry", {uid: 'admin'}, function (data) {
                    pomelo.disconnect();

                    pomelo.init({
                        host: data.host,
                        port: data.port,
                        log: true
                    }, function () {
//                        pomelo.request("connector.userHandler.register", {
//                            account: '13018071569',
//                            password: '12345678',
//                            sex: 'male'
//                        }, function (data) {
//                            console.log(data);
//                        });

//                        pomelo.request("connector.userHandler.verifyCode", {
//                            account: '13018071569',
//                            verifyCode: '671691'
//                        }, function (data) {
//                            console.log(data);
//                        });

                        pomelo.request("connector.userHandler.login", {
                            account: '13018071569',
                            password: '12345678'
                        }, function (data) {
                            console.log(data);
                        });

                    });

                });
            });
        }
    </script>
</head>
<body>
<div class="g-doc">
    <div class="g-banner" style="border:none">
        <div class="logo">
            <div class="img"></div>
        </div>
    </div>
    <div class="g-background">
        <div class="g-content">
            Welcome to Pomelo
        </div>
    </div>
    <div id="result"></div>
    <div class="g-button">
        <input id="test" type="button" value="Test Game Server" onclick="show()"/>
    </div>
</div>
</body>
</html>